import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login/LoginEx.vue')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'home',
          name: '主页',
          meta: {
            icon: 'dashboard'
          },
          component: () => import('@/pages/dashboard/workplace'),
        },
        {
          path: 'real',
          name: '实时监控',
          meta: {
            icon: 'table'
          },
          component: () => import('@/pages/realTime/box'),
        },
        {
          path: 'list',
          name: '电子地图',
          meta: {
            icon: 'table'
          },
          component: () => import('@/pages/map/mapPage'),
        },
        {
          path: 'details',
          name: '告警管理',
          meta: {
            icon: 'profile'
          },
          component: BlankView,
          children: [
            {
              path: 'DataHistroy',
              name: '实时告警视图',
              component: () => import('@/pages/alarm/ActiveAlarm.vue')
            },
            {
              path: 'AlarmAll',
              name: '告警查询',
              component: () => import('@/pages/alarm/AlarmAll.vue')
            },
            {
              path: 'AlarmLevelCfg',
              name: '告警等级配置',
              component: () => import('@/pages/alarm/AlarmLevelCfg.vue')
            },

          ]
        },
        /*{
          path: 'datam',
          name: '数据管理',
          meta: {
            icon: 'profile'
          },
          component: BlankView,
          children: [

            {
              path: 'DataHistroy',
              name: '历史数据查询',
              component: () => import('@/pages/data/DataHistroy.vue')
            },

          ]
        },*/
        {
          path: 'analyze',
          name: '统计报表',
          component: () => import('@/pages/home')
        },
        /*{
          path: 'dlist',
          name: '设备列表',
          component: () => import('@/pages/dcfg/thing')
        },*/
        {
          path: 'cfg',
          name: '设备管理',
          meta: {
            icon: 'check-circle-o',
          },
          component: BlankView,
          children: [
            {
              path: '/dcfg',
              name: '设备配置',
              component: () => import('@/pages/dcfg/dcfg.vue')
            },
            /*{
              path: '/test',
              name: '设备调试',
              hidden: true,
              component: () => import('@/pages/tester/index')
            },*/
            {
              path: '/enable',
              name: "全局配置",
              component: () => import('@/pages/enable/enable.vue')
            },
            
            {
              path: '/modal',
              name: '模型配置',
              hidden: true,
              component: () => import('@/pages/mcfg/index')
            },
          
            /*

            {
              path: '/area',
              name: '行政区域配置',
              hidden: true,
              component: () => import('@/pages/area/area.vue')
            },*/
          ]
        },
      ]
    },
  ]
}

export default options
